/*
 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SOFTBUS_IPC_DEF_H
#define SOFTBUS_IPC_DEF_H

#include <stdint.h>

#define SOFTBUS_SERVER_SA_ID_INNER 4700

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif

#define MAX_SOFT_BUS_IPC_LEN 512
#define MAX_SOFT_BUS_IPC_LEN_EX 2048
#define SOFTBUS_SERVICE "softbus_service"

struct CommonScvId {
    unsigned int handle;
    uintptr_t token;
    uintptr_t cookie;
    void *ipcCtx;
    unsigned int cbId;
};

/*SAID: 4700*/
enum SoftBusFuncId {
    MANAGE_REGISTER_SERVICE = 0,
    MANAGE_REGISTER_BR_PROXY_SERVICE,

    SERVER_CREATE_SESSION_SERVER = 128,
    SERVER_REMOVE_SESSION_SERVER,
    SERVER_OPEN_SESSION,
    SERVER_OPEN_AUTH_SESSION,
    SERVER_NOTIFY_AUTH_SUCCESS,
    SERVER_CLOSE_CHANNEL,
    SERVER_CLOSE_CHANNEL_STATISTICS,
    SERVER_SESSION_SENDMSG,
    SERVER_QOS_REPORT,
    SERVER_GRANT_PERMISSION,
    SERVER_REMOVE_PERMISSION,
    SERVER_STREAM_STATS,
    SERVER_GET_SOFTBUS_SPEC_OBJECT,

    SERVER_JOIN_LNN,
    SERVER_JOIN_METANODE,
    SERVER_LEAVE_LNN,
    SERVER_LEAVE_METANODE,
    SERVER_GET_ALL_ONLINE_NODE_INFO,
    SERVER_GET_LOCAL_DEVICE_INFO,
    SERVER_GET_NODE_KEY_INFO,
    SERVER_SET_NODE_DATA_CHANGE_FLAG,
    SERVER_START_TIME_SYNC,
    SERVER_STOP_TIME_SYNC,
    SERVER_PUBLISH_LNN,
    SERVER_STOP_PUBLISH_LNN,
    SERVER_REFRESH_LNN,
    SERVER_STOP_REFRESH_LNN,
    SERVER_ACTIVE_META_NODE,
    SERVER_DEACTIVE_META_NODE,
    SERVER_GET_ALL_META_NODE_INFO,
    SERVER_SHIFT_LNN_GEAR,
    SERVER_TRIGGER_RANGE_FOR_MSDP,
    SERVER_STOP_RANGE_FOR_MSDP,
    SERVER_REG_RANGE_CB_FOR_MSDP,
    SERVER_UNREG_RANGE_CB_FOR_MSDP,
    SERVER_SYNC_TRUSTED_RELATION,
    SERVER_RIPPLE_STATS,
    SERVER_GET_BUS_CENTER_EX_OBJ,
    SERVER_EVALUATE_QOS,
    SERVER_RELEASE_RESOURCES,
    SERVER_REG_DATA_LEVEL_CHANGE_CB,
    SERVER_UNREG_DATA_LEVEL_CHANGE_CB,
    SERVER_SET_DATA_LEVEL,
    SERVER_CTRL_LNN_BLE_HB,
    SERVER_PROCESS_INNER_EVENT,
    SERVER_PRIVILEGE_CLOSE_CHANNEL,
    SERVER_SET_DISPLAY_NAME,
    SERVER_GENERAL_CREATE_SERVER,
    SERVER_GENERAL_REMOVE_SERVER,
    SERVER_GENERAL_CONNECT,
    SERVER_GENERAL_DISCONNECT,
    SERVER_GENERAL_SEND,
    SERVER_GENERAL_GET_PEER_DEVICE_ID,
    SERVER_OPEN_BR_PROXY,
    SERVER_CLOSE_BR_PROXY,
    SERVER_SEND_BR_PROXY_DATA,
    SERVER_SET_BR_PROXY_LISTENER_STATE,
    SERVER_GET_BR_PROXY_CHANNEL_STATE,
    SERVER_REGISTER_PUSH_HOOK,

    CLIENT_ON_CHANNEL_OPENED = 256,
    CLIENT_ON_CHANNEL_OPENFAILED,
    CLIENT_ON_CHANNEL_LINKDOWN,
    CLIENT_ON_CHANNEL_CLOSED,
    CLIENT_ON_CHANNEL_MSGRECEIVED,
    CLIENT_ON_CHANNEL_QOSEVENT,

    CLIENT_ON_JOIN_RESULT,
    CLIENT_ON_JOIN_METANODE_RESULT,
    CLIENT_ON_LEAVE_RESULT,
    CLIENT_ON_LEAVE_METANODE_RESULT,
    CLIENT_ON_NODE_DEVICE_TRUST_CHANGED,
    CLIENT_ON_HICHAIN_PROOF_EXCEPTION,
    CLIENT_ON_NODE_ONLINE_STATE_CHANGED,
    CLIENT_ON_NODE_BASIC_INFO_CHANGED,
    CLIENT_ON_NODE_STATUS_CHANGED,
    CLIENT_ON_LOCAL_NETWORK_ID_CHANGED,
    CLIENT_ON_TIME_SYNC_RESULT,
    CLIENT_ON_PUBLISH_LNN_RESULT,
    CLIENT_ON_REFRESH_LNN_RESULT,
    CLIENT_ON_REFRESH_DEVICE_FOUND,
    CLIENT_ON_PERMISSION_CHANGE,
    CLIENT_SET_CHANNEL_INFO,
    CLIENT_ON_DATA_LEVEL_CHANGED,
    CLIENT_ON_RANGE_RESULT,
    CLIENT_ON_TRANS_LIMIT_CHANGE,
    CLIENT_ON_CHANNEL_BIND,
    CLIENT_CHANNEL_ON_QOS,
    CLIENT_CHECK_COLLAB_RELATION,
    CLIENT_GENERAL_CONNECTION_STATE_CHANGE,
    CLIENT_GENERAL_ACCEPT_CONNECT,
    CLIENT_GENERAL_DATA_RECEIVED,
    CLIENT_ON_BR_PROXY_OPENED,
    CLIENT_ON_BR_PROXY_DATA_RECV,
    CLIENT_ON_BR_PROXY_STATE_CHANGED,
    CLIENT_ON_BR_PROXY_QUERY_PERMISSION,
    SOFTBUS_FUNC_ID_BUIT,
};

#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */

#endif
